package com.zyl.pts.mapper;

import com.zyl.pts.domain.bean.FenceHouse;
import com.zyl.pts.domain.bean.Hurdles;
import com.zyl.pts.domain.dto.FHDTO.FHUpdateOrAddDTO;
import com.zyl.pts.domain.vo.FHVO.FHByIdVO;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @version v1.0
 * @ProjectName: product_source
 * @Package: com.zyl.pts.mapper
 * @ClassName: FHMapper
 * @Description TODO()
 * @Author 翟玉龙
 * @Date 2024/11/19-15:33
 */
@Component
@Mapper
public interface FHMapper {

    /**
     * 根据栏舍id查询对应栏舍信息
     * @param id 栏舍id
     * @return {@link FenceHouse }
     */
    FenceHouse getFenceHouseById(String id);

    /**
     * 根据栏舍编号查询栏舍信息以及栏圈信息接口
     * @param id 栏舍编号
     * @return {@link FHByIdVO }
     */
    FHByIdVO getFenceHouseAndHurdlesById(String id);

    /**
     * 获取围栏列表
     * @param fhName 围栏名称
     * @return {@link List }<{@link FenceHouse }>
     */
    List<FenceHouse> getFenceHouseList(String fhName);

    /**
     * 根据栏舍编号查询栏舍信息以及栏圈信息
     * @param fhId 栏舍编号
     * @return {@link List }<{@link Hurdles }>
     */
    List<Hurdles> getFenceHouseAndHurdles(String fhId);

    /**
     * 新增栏舍
     * @param fenceHouse 栏舍信息
     * @return int
     */
    int addFenceHouse(FHUpdateOrAddDTO fenceHouse);

    /**
     * 修改栏舍
     * @param fenceHouse 栏舍信息
     * @return int
     */
    int updateFenceHouse(FHUpdateOrAddDTO fenceHouse);

    /**
     * 根据栏舍id删除栏舍信息
     * @param id 栏舍id
     * @return int
     */
    int deleteFenceHouse(String id);

    /**
     * 根据栏舍id列表批量删除
     * @param idList 栏舍id列表
     * @return boolean
     */
    boolean deleteFenceHouseBatch(List<String> idList);
}
